<template>
  <div class="app-container">
    <div class="divStyle">
      <div class="processStyle">
        <div v-for="(item,index) in arr" :key="index" class="divWrapStyle" @mouseenter="mouseenterFun(index)" @click="gotoDetail">
          <div class="topStyle">
            <img :src="item.pic" class="picStyleItem">
          </div>
          <div class="b-f bottomStyle" @click.stop>
            <div><span class="iconStyle"></span>{{ item.name }}</div>
            <div>作者：{{ item.antor }}</div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'otherProcess',
  components: {
  },
  data() {
    return {
      name: '',
      nowIndex: -1,
      arr: [{
        pic: 'https://img.99ppt.com/pic/d545d083-6ef2-4a81-b6cb-0a7b814731bc.png',
        name: '系统架构图'
      }, {
        pic: 'https://img.99ppt.com/pic/d545d083-6ef2-4a81-b6cb-0a7b814731bc.png',
        name: '系统架构图'
      }, {
        pic: 'https://img.99ppt.com/pic/d545d083-6ef2-4a81-b6cb-0a7b814731bc.png',
        name: '系统架构图'
      }, {
        pic: 'https://img.99ppt.com/pic/d545d083-6ef2-4a81-b6cb-0a7b814731bc.png',
        name: '系统架构图'
      }, {
        pic: 'https://img.99ppt.com/pic/d545d083-6ef2-4a81-b6cb-0a7b814731bc.png',
        name: '系统架构图'
      }, {
        pic: 'https://img.99ppt.com/pic/d545d083-6ef2-4a81-b6cb-0a7b814731bc.png',
        name: '系统架构图'
      }, {
        pic: 'https://img.99ppt.com/pic/d545d083-6ef2-4a81-b6cb-0a7b814731bc.png',
        name: '系统架构图'
      }, {
        pic: 'https://img.99ppt.com/pic/d545d083-6ef2-4a81-b6cb-0a7b814731bc.png',
        name: '系统架构图'
      }, {
        pic: 'https://img.99ppt.com/pic/d545d083-6ef2-4a81-b6cb-0a7b814731bc.png',
        name: '系统架构图'
      }, {
        pic: 'https://img.99ppt.com/pic/d545d083-6ef2-4a81-b6cb-0a7b814731bc.png',
        name: '系统架构图'
      }, {
        pic: 'https://img.99ppt.com/pic/d545d083-6ef2-4a81-b6cb-0a7b814731bc.png',
        name: '系统架构图'
      }, {
        pic: 'https://img.99ppt.com/pic/d545d083-6ef2-4a81-b6cb-0a7b814731bc.png',
        name: '系统架构图'
      }, {
        pic: 'https://img.99ppt.com/pic/d545d083-6ef2-4a81-b6cb-0a7b814731bc.png',
        name: '系统架构图'
      }, {
        pic: 'https://img.99ppt.com/pic/d545d083-6ef2-4a81-b6cb-0a7b814731bc.png',
        name: '系统架构图'
      }, {
        pic: 'https://img.99ppt.com/pic/d545d083-6ef2-4a81-b6cb-0a7b814731bc.png',
        name: '系统架构图'
      }, {
        pic: 'https://img.99ppt.com/pic/d545d083-6ef2-4a81-b6cb-0a7b814731bc.png',
        name: '系统架构图'
      }],
      url: '',
      srcList: [],
      isEdit: false,
    }
  },
  created() { },
  methods: {
    initData() {

    },
    reNameFun(info) {
      this.$refs.renameDialog.show({ data: info, title: "重命名" })
    },
    cooperationFun(info) {
      this.$refs.cooperationDialog.show({ data: info, title: "选择协作者" })
    },
    publishFun(info) {
      this.$refs.publishDialog.show({ data: info, title: "发布和公开" })
    },
    copyFun(info) {
      this.$confirm(`确认克隆一份【${info.name}】吗？`)
        .then(function () {

        })
        .then(() => {

        })
        .catch(() => { });
    },
    downFun() {

    },
    delFun(info) {
      this.$confirm(`确认删除【${info.name}】吗？`)
        .then(function () {

        })
        .then(() => {

        })
        .catch(() => { });
    },
    reviewFun(url) {
      this.url = url;
      this.srcList = [this.url];
      setTimeout(() => {
        this.$refs.image__preview.clickHandler();
      }, 100);
    },
    gotoAdd() {
      this.$refs.addNewRef.show({
        title: '新建流程图'
      })
    },
    gotoDetail() {
      this.$router.push({
        name: 'ProcessOn',
        // query: {
        //   modelId: '3cd88b2c-a09c-11ed-b5b4-acde48001122'
        // }
      })
    },
    mouseenterFun(val) {
      this.nowIndex = val
    },
    mouseleaveFun() {
      this.nowIndex = -1
    }
  }
}
</script>

<style lang="scss" scoped>
  .my-process-designer {
    height: calc(100vh - 200px);
  }
  :deep(.el-tabs__active-bar) {
    background-color: #1784fc;
    width: 72px;
  }
  :deep(.el-tabs__nav-wrap::after) {
    background-color: #e9ecf1;
  }
  :deep(.el-tabs__item.is-active) {
    color: #333;
    font-weight: bold;
    font-size: 18px !important;
  }

  :deep(.el-tabs__item) {
    font-size: 18px !important;
    font-weight: 500;
    color: #868b8f;
    height: 50px;
  }
  .divStyle {
    min-height: 70vh;
    cursor: pointer;
  }

  .borderStyle {
    box-sizing: border-box;
    margin-top: 17px;
    width: 298px;
    padding: 16px 20px;
    border-radius: 4px;
    border: 1px solid #e9ecf1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    .imgStyle {
      display: inline-block;
      width: 20px;
      height: 20px;
      background: url('~@/assets/img/progress.png') no-repeat center;
      margin-right: 12px;
    }
    .addStyle {
      display: inline-block;
      width: 20px;
      height: 20px;
      background: url('~@/assets/img/add.png') no-repeat center;
    }
  }
  .picStyle {
    padding-top: 153px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .developStyle {
    width: 422px;
    height: 241px;
    background: url('~@/assets/img/develop.png') no-repeat center;
    background-size: 422px 241px;
  }
  .pic1 {
    display: inline-block;
    width: 20px;
    height: 26px;
    background: url('~@/assets/img/yulan.png') no-repeat center;
  }
  .pic2 {
    display: inline-block;
    width: 20px;
    height: 26px;
    background: url('~@/assets/img/rename.png') no-repeat center;
  }
  .pic3 {
    display: inline-block;
    width: 20px;
    height: 26px;
    background: url('~@/assets/img/fenxiang.png') no-repeat center;
  }
  .pic4 {
    display: inline-block;
    width: 20px;
    height: 26px;
    background: url('~@/assets/img/publish.png') no-repeat center;
  }
  .pic5 {
    display: inline-block;
    width: 20px;
    height: 26px;
    background: url('~@/assets/img/copy.png') no-repeat center;
  }
  .pic6 {
    display: inline-block;
    width: 20px;
    height: 26px;
    background: url('~@/assets/img/downLoad.png') no-repeat center;
  }
  .pic7 {
    display: inline-block;
    width: 20px;
    height: 26px;
    background: url('~@/assets/img/del.png') no-repeat center;
  }
  .textStyle {
    color: #868b8f;
    text-align: center;
  }
  .bottomStyle {
    height: 48px;
    padding: 0 20px;
    font-weight: 500;
    color: #333333;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .topStyle {
    background: #f6f7f8;
    height: calc(100% - 48px);
  }
  .divWrapStyle {
    display: inline-block;
    height: 221px;
    width: calc((100% - 192px) / 6);
    box-sizing: border-box;
    border-radius: 4px 4px 0px 0px;
    border: 1px solid #e9ecf1;
    margin-right: 32px;
    margin-top: 20px;
  }
  .divWrapStyle:nth-child(6n) {
    margin-right: 0;
  }
  .divWrapStyle:hover {
    box-shadow: 0px 0px 8px 4px rgba(32, 43, 60, 0.1);
  }
  .iconStyle {
    display: inline-block;
    background: url('~@/assets/img/jiagou.png') no-repeat center;
    width: 15px;
    height: 15px;
    margin-right: 15px;
  }
  .dotWrapStyle {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    .dotStyle {
      width: 2px;
      height: 2px;
      background: #000;
      border-radius: 50%;
      margin-right: 2px;
    }
    .dotStyle:last-child {
      margin-right: 0;
    }
  }
  .dotWrapStyle:hover {
    // width: 20px;
    // height: 20px;
    background: #f2f2f2;
    border-radius: 2px;
    // display: flex;
    // justify-content: center;
    // align-content: center;
  }
  .picStyleItem {
    width: 100%;
    height: 100%;
    background-size: cover;
  }
  .inputStyle {
    position: absolute;
    right: 60px;
    z-index: 1;
    display: inline-block;
    width: 320px;
    height: 40px;
    line-height: 40px;
  }
</style>
